Video data inevitably suffers bit error or packet loss in cable networks and radio networks, especially in radio networks. Video data after being efficiently compressed by tools such as variable length coding has great relevance in semantics. As such, the video data is very sensitive to network errors such as bit error and packet loss. Once a bit error occurs in the video data, not only recovery of current video data is affected, but also the bit error spreads in time and space domains. In addition, predictive coding of the video data also makes errors of a certain frame have the effect of error accumulation on subsequent frames. Therefore, it is necessary to take relevant measures to improve the capability of video data for resisting bit errors. Especially when certain video frames already have transmission errors, video content needs to be recovered from the errors as soon as possible, thereby providing favorable subjective experience for users.
Intra-frame refreshing method is a simple and efficient error recovery method, for example, I-frame refreshing method, I-block refreshing method based on random or error tracking, and adaptive intra-frame macroblock refreshing method, and so on. An I-frame uses an intra-frame (INTRA) coding method for coding, and therefore may be also called intra coded frame. The I-frame does not need to refer to other frames. This frame is moderately compressed as a random access reference point, and as an image. As refreshing the whole I-frame will result in frames with high code rates that suddenly occur in bit stream, which will lead to a rather strong bit stream shock to the system. Therefore, in practical, the frame is refreshed by refreshing partial coding blocks in the frame for most of the time.
A P frame in video frames uses an inter-frame (INTER) coding method for coding, and therefore the P frame may also be called inter coded frame. Inter-frame prediction of the P frame needs to refer to previous P frames. Therefore, when a certain P frame has a transmission error, the error will be transferred to subsequent P frames, thereby resulting in severe degrade of the decoding quality of subsequent P frames. As such, to avoid degrade of the decoding quality, an intra refresh frame (IR frame) may be defined in the P frame. Partial or all coding blocks in the IR frame use the intra-frame coding method for coding. The coding blocks that use intra-frame coding may also be called intra refreshing blocks. As such, the intra coding blocks (intra refreshing blocks) in the IR frame will not directly refer to the P frame before the IR frame for coding, but refer to neighboring coding blocks of the frame and use the intra-frame coding method for coding.
If a neighboring coding block of a certain intra coding block is an inter coding block, however, the inter coding block still refers to the previous P frame, the inter coding block may also accumulate certain transmission errors from the previous reference frames, and pass the errors to an intra coding block that is used for refreshing, so that the intra coding block is also adversely affected by transmission errors, thereby greatly reducing the due error recovery capability of the intra refreshing method, and affecting the decoding quality of image data such as a video.